
package com.fire.eyes.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.fire.eyes.dao.FireResourceMapper;
import com.fire.eyes.model.FireResourceModel;
import com.fire.eyes.service.IFireResourceService;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.plugins.Page;

import java.util.List;
import java.util.Map;

/**
 * 消防警力Service
 *
 * @author Matthew
 * @Date 2019-01-17 20:48
 */
@Service
public class FireResourceServiceImpl extends ServiceImpl<FireResourceMapper, FireResourceModel> implements IFireResourceService{

    private static final Logger LOGGER = LoggerFactory.getLogger(FireResourceServiceImpl.class);

    @Autowired
    private FireResourceMapper fireResourceMapper;

    @Override
    public FireResourceModel selectOne(FireResourceModel entity){
        return fireResourceMapper.selectOne(entity);
    }

    @Override
    public List<FireResourceModel>selectList(FireResourceModel model){
        return fireResourceMapper.selectListByModel(model);
    }

    @Override
    public Page<FireResourceModel> selectPage(int currentPage, int pageSize, Wrapper<FireResourceModel> wrapper){
        return selectPage(new Page<FireResourceModel>(currentPage,pageSize), wrapper);
    }

    @Override
    public Page<Map<String, Object>> selectMapsPage(int currentPage, int pageSize, Wrapper<FireResourceModel> wrapper){
        return selectMapsPage(new Page<FireResourceModel>(currentPage,pageSize), wrapper);
    }

}
